﻿using System;
using System.Diagnostics;

namespace Cookbook.Services.Core.Common
{
   public interface ILogger
   {
      /// <summary>
      /// Writes a formatted log entry to the logging category identified by <see cref="TraceEventType.Information"/>.
      /// </summary>
      void Information(string formattedMessage, params object [] arguments);

      /// <summary>
      /// Writes a formatted log entry to the logging category identified by <see cref="TraceEventType.Warning"/>.
      /// </summary>
      void Warning(string formattedMessage, params object [] arguments);

      /// <summary>
      /// Writes a formatted log entry to the logging category identified by <see cref="TraceEventType.Error"/>.
      /// </summary>
      void Error(string formattedMessage, params object [] arguments);

      /// <summary>
      /// Writes a process dump of the exception to the logging category identified by <see cref="TraceEventType.Error"/>.
      /// </summary>
      void Error(Exception exception);

      /// <summary>
      /// Writes a process dump of the exception to the logging category identified by <see cref="TraceEventType.Error"/>, adding the errorReference.
      /// </summary>
      void Error(Exception exception, string errorReference);

      /// <summary>
      /// Writes a formatted log entry to the logging category identified by <see cref="TraceEventType.Verbose"/>.
      /// </summary>
      void Verbose(string formattedMessage, params object [] arguments);

      /// <summary>
      /// Writes a formatted log entry to the logging category identified by <see cref="TraceEventType.Critical"/>.
      /// </summary>
      void Critical(string formattedMessage, params object[] arguments);

      /// <summary>
      /// Writes a process dump of the exception to the logging category identified by <see cref="TraceEventType.Critical"/>.
      /// </summary>
      void Critical(Exception exception);

      /// <summary>
      /// Writes a process dump of the exception to the logging category identified by <see cref="TraceEventType.Critical"/>, adding the errorReference.
      /// </summary>
      void Critical(Exception exception, string errorReference);
   }
}